package Lab4;

import java.awt.*;
import java.util.ArrayList;
import java.util.Arrays;

public class CatTest3 {
    public static void main(String[] args) {
        Cat[] cats = new Cat[5];
        cats[0] = new Cat("Napoleon", "short", false, Color.ORANGE, 300);
        cats[1] = new Cat("Tom", "short", true, Color.ORANGE, 200);
        cats[2] = new Cat("Jerry", "long", true, Color.ORANGE, 300);
        cats[3] = new Cat("Mack", "short", false, Color.ORANGE, 400);
        cats[4] = new Cat("Cooper", "long", true, Color.ORANGE, 300);
        ArrayList<Cat> catArrayList = new ArrayList<Cat>(Arrays.asList(cats));
        Cat cat4 = catArrayList.get(4);
        System.out.println(cat4.toString());
        System.out.println("-----------------------------");
        System.out.printf("length = %d\n", catArrayList.size());
        System.out.println("-----------------------------");
        catArrayList.remove(3);
        for (Cat cat : catArrayList) {
            System.out.println(cat.toString());
            System.out.println("-----------------------------");
        }
    }

}
